package com.tjshop.android.util;

import android.content.Context;
import android.text.SpannableString;
import android.text.style.StrikethroughSpan;
import android.util.AttributeSet;
import android.widget.TextView;

public class StrikethroughTextView extends TextView {
	public StrikethroughTextView(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	public StrikethroughTextView(Context context) {
		super(context);
	}

	public StrikethroughTextView(Context context, AttributeSet attrs,
			int defStyle) {
		super(context, attrs, defStyle);
	}

	@Override
	public void setText(CharSequence text, BufferType type) {
		SpannableString content = new SpannableString(text);
		content.setSpan(new StrikethroughSpan(), 0, text.length(), 0);

		super.setText(content, type);
	}
}